<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<script src="./lib/echarts.min.js"></script>
	</head>
	<body>
		<div style="width: 600px; height: 400px"></div>

		<script type="text/javascript">
			let mCharts = echarts.init(document.querySelector('div'));
			// 各个维度的最大值
			let dataMax = [
				{
					name: '易用性',
					max: 100,
				},
				{
					name: '功能',
					max: 100,
				},
				{
					name: '拍照',
					max: 100,
				},
				{
					name: '跑分',
					max: 100,
				},
				{
					name: '续航',
					max: 100,
				},
			];
			let option = {
				radar: {
					indicator: dataMax, //配置各个维度的最大值
					shape: 'circle', //配置雷达图最外层的图形 circle圆形 polygon多边形
				},
				series: [
					{
						type: 'radar', //类型为雷达图
						label: {
							show: true, //显示数值
						},
						areaStyle: {}, //每一个产品雷达图形成的阴影面积
						data: [
							{
								name: '华为手机',
								value: [80, 90, 80, 83, 90],
							},
							{
								name: '中兴手机',
								value: [70, 82, 75, 70, 86],
							},
						],
					},
				],
			};
			mCharts.setOption(option);
		</script>
	</body>
</html>
